#!/usr/bin/env python
# -*- coding: utf-8 -*-

# @Time     :2020/11/04
# @Author   :Changshu
# @File     :Exercise_405.py
# 405. 数字转换为十六进制数

# 4294967295
def toHex(num: int) -> str:
	if num==0:
		return str(0)
	# 2**32-1
	n=num&4294967295
	r=''
	while n!=0:
		t = n % 16
		n = n >>4
		if t==10:
			r='a'+r
		elif t==11:
			r='b'+r
		elif t==12:
			r='c'+r
		elif t==13:
			r='d'+r
		elif t==14:
			r='e'+r
		elif t==15:
			r='f'+r
		else:
			r=str(t)+r
	return r

if __name__ == '__main__':
	num=-223
	print(toHex(num))